package com.autoMobile.servlet;

import com.autoMobile.dao.ddmUserDao;

import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;




@WebServlet("/ddm/deleteServlet")
public class deleteServlet extends HttpServlet {
	private static final long serialVersionUID = 1L;
       
   
    public deleteServlet() {
       
    }

	
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		this.doPost(request, response);
	}

	
	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		int s=Integer.parseInt(request.getParameter("id"));
		ddmUserDao dao=new ddmUserDao();
		dao.deleteUser(s);
		response.sendRedirect(request.getContextPath()+"/ddm/shenqing");
	}

}
